package com.wxy.controller;

/**
 * @Author：wangxinyu
 * @Package：com.wxy.controller
 * @Project：Test_observer
 * @name：BinaryObserver
 * @Date：2024/7/31 19:39
 */
public class BinaryObserver extends Observer {
    public BinaryObserver(Subject subject) {
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("BinaryObserver update"+Integer.toBinaryString(subject.getState()));
    }



}
